ifneq ($(KERNELRELEASE),)
#obj-m :=drv.o
obj-m:=led_ioctl.o

led_ioctl-objs:=drv.o  #这后边可以加多个文件
else
PWD:=$(shell pwd)

#KDIR:=/lib/modules/`uname -r`/kernel
KDIR:=/home/supanyang/u-boot/linux-3.0.85
all:
#   make -C $(KDIR) M=$(PWD)
	make -C $(KDIR) M=$(PWD) modules

clean:
	make -C $(KDIR) M=$(PWD) clean	
    
#clean:
#	rm -rf *.o *.mod.c *.symvers *.c~ *~
#	rm -rf .*.cmd .*.swp .tmp_versions *.order
endif